310. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2023-07-12 04:43:09 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

310.1 Files compared

#LocationFileLast Modified
1Porto v4.0.5/Theme Files/Porto Theme/app/design/frontend/Smartwave/porto/Magento_Theme/web/jstheme.js2023-03-17 00:51:02 +0000
2Porto v4.0.6/Theme Files/Porto Theme/app/design/frontend/Smartwave/porto/Magento_Theme/web/jstheme.js2023-07-01 08:59:57 +0000

310.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged3402
Changed24
Inserted00
Removed00

310.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

310.4 Active regular expressions

No regular expressions were active.

310.5 Comparison detail

1 /** 1 /**
2  * Copyright © 2015 Magento. All rights reserved. 2  * Copyright © 2015 Magento. All rights reserved.
3  * See COPYING.txt for license details. 3  * See COPYING.txt for license details.
4  */ 4  */
5 require([ 5 require([
6     'jquery', 6     'jquery',
7     'mage/smart-keyboard-handler', 7     'mage/smart-keyboard-handler',
8     'mage/mage',  8     'mage/mage',
9     'domReady!' 9     'domReady!'
10 ], function ($, keyboardHandler) { 10 ], function ($, keyboardHandler) {
11     'use strict'; 11     'use strict';
12     $(document).ready(function(){ 12     $(document).ready(function(){
13         $('.cart-summary').mage('sticky', { 13         $('.cart-summary').mage('sticky', {
14             container: '#maincontent' 14             container: '#maincontent'
15         }); 15         });
16  16 
17         $('.panel.header .header.links').clone().appendTo('#store\\.links'); 17         $('.panel.header .header.links').clone().appendTo('#store\\.links');
18     }); 18     });
19     keyboardHandler.apply(); 19     keyboardHandler.apply();
20 }); 20 });
21 require([ 21 require([
22     'jquery' 22     'jquery'
23 ], function ($) { 23 ], function ($) {
24     (function() { 24     (function() {
25         var ev = new $.Event('classadded'), 25         var ev = new $.Event('classadded'),
26             orig = $.fn.addClass; 26             orig = $.fn.addClass;
27         $.fn.addClass = function() { 27         $.fn.addClass = function() {
28             $(this).trigger(ev, arguments); 28             $(this).trigger(ev, arguments);
29             return orig.apply(this, arguments); 29             return orig.apply(this, arguments);
30         } 30         }
31     })(); 31     })();
32     $.fn.extend({ 32     $.fn.extend({
33         scrollToMe: function(){ 33         scrollToMe: function(){
34             if($(this).length){ 34             if($(this).length){
35                 var top = $(this).offset().top - 100; 35                 var top = $(this).offset().top - 100;
36                 $('html,body').animate({scrollTop: top}, 300); 36                 $('html,body').animate({scrollTop: top}, 300);
37             } 37             }
38         }, 38         },
39         scrollToJustMe: function(){ 39         scrollToJustMe: function(){
40             if($(this).length){ 40             if($(this).length){
41                 var top = jQuery(this).offset().top; 41                 var top = jQuery(this).offset().top;
42                 $('html,body').animate({scrollTop: top}, 300); 42                 $('html,body').animate({scrollTop: top}, 300);
43             } 43             }
44         } 44         }
45     }); 45     });
46     $(document).ready(function(){ 46     $(document).ready(function(){
47         var windowScroll_t; 47         var windowScroll_t;
48         $(window).scroll(function(){ 48         $(window).scroll(function(){
49             clearTimeout(windowScroll_t); 49             clearTimeout(windowScroll_t);
50             windowScroll_t = setTimeout(function(){ 50             windowScroll_t = setTimeout(function(){
51                 if(jQuery(this).scrollTop() > 100){ 51                 if(jQuery(this).scrollTop() > 100){
52                     $('#totop').fadeIn(); 52                     $('#totop').fadeIn();
53                 }else{ 53                 }else{
54                     $('#totop').fadeOut(); 54                     $('#totop').fadeOut();
55                 } 55                 }
56             }, 500); 56             }, 500);
57         }); 57         });
58         $('#totop').off("click").on("click",function(){ 58         $('#totop').off("click").on("click",function(){
59             $('html, body').animate({scrollTop: 0}, 600); 59             $('html, body').animate({scrollTop: 0}, 600);
60         }); 60         });
61         if ($('body').hasClass('checkout-cart-index')) { 61         if ($('body').hasClass('checkout-cart-index')) {
62             if ($('#co-shipping-method-form .fieldset.rates').length > 0 && $('#co-shipping-method-form .fieldset.rates :checked').length === 0) { 62             if ($('#co-shipping-method-form .fieldset.rates').length > 0 && $('#co-shipping-method-form .fieldset.rates :checked').length === 0) {
63                 $('#block-shipping').on('collapsiblecreate', function () { 63                 $('#block-shipping').on('collapsiblecreate', function () {
64                     $('#block-shipping').collapsible('forceActivate'); 64                     $('#block-shipping').collapsible('forceActivate');
65                 }); 65                 });
66             } 66             }
67         } 67         }
68         $(".products-grid .weltpixel-quickview").each(function(){ 68         $(".products-grid .weltpixel-quickview").each(function(){
69             $(this).appendTo($(this).parent().parent().children(".product-item-photo")); 69             $(this).appendTo($(this).parent().parent().children(".product-item-photo"));
70         }); 70         });
71         $(".word-rotate").each(function() { 71         $(".word-rotate").each(function() {
72  72 
73             var $this = $(this), 73             var $this = $(this),
74                 itemsWrapper = $(this).find(".word-rotate-items"), 74                 itemsWrapper = $(this).find(".word-rotate-items"),
75                 items = itemsWrapper.find("> span"), 75                 items = itemsWrapper.find("> span"),
76                 firstItem = items.eq(0), 76                 firstItem = items.eq(0),
77                 firstItemClone = firstItem.clone(), 77                 firstItemClone = firstItem.clone(),
78                 itemHeight = 0, 78                 itemHeight = 0,
79                 currentItem = 1, 79                 currentItem = 1,
80                 currentTop = 0; 80                 currentTop = 0;
81  81 
82             itemHeight = firstItem.height(); 82             itemHeight = firstItem.height();
83  83 
84             itemsWrapper.append(firstItemClone); 84             itemsWrapper.append(firstItemClone);
85  85 
86             $this 86             $this
87                 .height(itemHeight) 87                 .height(itemHeight)
88                 .addClass("active"); 88                 .addClass("active");
89  89 
90             setInterval(function() { 90             setInterval(function() {
91                 currentTop = (currentItem * itemHeight); 91                 currentTop = (currentItem * itemHeight);
92  92 
93                 itemsWrapper.animate({ 93                 itemsWrapper.animate({
94                     top: -(currentTop) + "px" 94                     top: -(currentTop) + "px"
95                 }, 300, function() { 95                 }, 300, function() {
96                     currentItem++; 96                     currentItem++;
97                     if(currentItem > items.length) { 97                     if(currentItem > items.length) {
98                         itemsWrapper.css("top", 0); 98                         itemsWrapper.css("top", 0);
99                         currentItem = 1; 99                         currentItem = 1;
100                     } 100                     }
101                 }); 101                 });
102  102 
103             }, 2000); 103             }, 2000);
104  104 
105         }); 105         });
106         $(".top-links-icon").off("click").on("click", function(e){ 106         $(".top-links-icon").off("click").on("click", function(e){
107             if($(this).parent().children("ul.links").hasClass("show")) { 107             if($(this).parent().children("ul.links").hasClass("show")) {
108                 $(this).parent().children("ul.links").removeClass("show"); 108                 $(this).parent().children("ul.links").removeClass("show");
109             } else { 109             } else {
110                 $(this).parent().children("ul.links").addClass("show"); 110                 $(this).parent().children("ul.links").addClass("show");
111             } 111             }
112             e.stopPropagation(); 112             e.stopPropagation();
113         }); 113         });
114         $(".top-links-icon").parent().click(function(e){ 114         $(".top-links-icon").parent().click(function(e){
115             e.stopPropagation(); 115             e.stopPropagation();
116         }); 116         });
117         $(".search-toggle-icon").click(function(e){ 117         $(".search-toggle-icon").click(function(e){
118             if($(this).parent().children(".block-search").hasClass("show")) { 118             if($(this).parent().children(".block-search").hasClass("show")) {
119                 $(this).parent().children(".block-search").removeClass("show"); 119                 $(this).parent().children(".block-search").removeClass("show");
120                 $(this).removeClass('open'); 120                 $(this).removeClass('open');
121             } else { 121             } else {
122                 $(this).parent().children(".block-search").addClass("show"); 122                 $(this).parent().children(".block-search").addClass("show");
123                 $(this).addClass('open'); 123                 $(this).addClass('open');
124             } 124             }
125             e.stopPropagation(); 125             e.stopPropagation();
126         }); 126         });
127         $(".search-toggle-icon").parent().click(function(e){ 127         $(".search-toggle-icon").parent().click(function(e){
128             e.stopPropagation(); 128             e.stopPropagation();
129         }); 129         });
130         $("html,body").click(function(){ 130         $("html,body").click(function(){
131             $(".search-toggle-icon").parent().children(".block-search").removeClass("show"); 131             $(".search-toggle-icon").parent().children(".block-search").removeClass("show");
132             $('.autocomplete-suggestions').hide(); 132             $('.autocomplete-suggestions').hide();
133             $(".search-toggle-icon").removeClass('open'); 133             $(".search-toggle-icon").removeClass('open');
134             $(".top-links-icon").parent().children("ul.links").removeClass("show"); 134             $(".top-links-icon").parent().children("ul.links").removeClass("show");
135         }); 135         });
136  136 
137         /********************* Qty Holder **************************/ 137         /********************* Qty Holder **************************/
138         $(document).on("click", ".qtyplus", function(e) { 138         $(document).on("click", ".qtyplus", function(e) {
139             // Stop acting like a button 139             // Stop acting like a button
140             e.preventDefault(); 140             e.preventDefault();
141             // Get its current value 141             // Get its current value
142             var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val()); 142             var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val());
143             // If is not undefined 143             // If is not undefined
144             if (!isNaN(currentVal)) { 144             if (!isNaN(currentVal)) {
145                 // Increment 145                 // Increment
146                 $(this).parents('form').find('input[name="qty"]').val(currentVal + 1); 146                 $(this).parents('form').find('input[name="qty"]').val(currentVal + 1);
147             } else { 147             } else {
148                 // Otherwise put a 0 there 148                 // Otherwise put a 0 there
149                 $(this).parents('form').find('input[name="qty"]').val(0); 149                 $(this).parents('form').find('input[name="qty"]').val(0);
150             } 150             }
151         }); 151         });
152         // This button will decrement the value till 0 152         // This button will decrement the value till 0
153         $(document).on("click", ".qtyminus", function(e) { 153         $(document).on("click", ".qtyminus", function(e) {
154             // Stop acting like a button 154             // Stop acting like a button
155             e.preventDefault(); 155             e.preventDefault();
156             // Get the field name 156             // Get the field name
157             fieldName = $(this).attr('field'); 157             fieldName = $(this).attr('field');
158             // Get its current value 158             // Get its current value
159             var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val()); 159             var currentVal = parseInt($(this).parents('form').find('input[name="qty"]').val());
160             // If it isn't undefined or its greater than 0 160             // If it isn't undefined or its greater than 0
161             if (!isNaN(currentVal) && currentVal > 0) { 161             if (!isNaN(currentVal) && currentVal > 0) {
162                 // Decrement one 162                 // Decrement one
163                 $(this).parents('form').find('input[name="qty"]').val(currentVal - 1); 163                 $(this).parents('form').find('input[name="qty"]').val(currentVal - 1);
164             } else { 164             } else {
165                 // Otherwise put a 0 there 165                 // Otherwise put a 0 there
166                 $(this).parents('form').find('input[name="qty"]').val(0); 166                 $(this).parents('form').find('input[name="qty"]').val(0);
167             } 167             }
168         }); 168         });
169         $(".qty-inc").unbind('click').click(function(){ 169         $(".qty-inc").unbind('click').click(function(){
170             if($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").is(':enabled')){ 170             if($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").is(':enabled')){
171                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val((+$(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() + 1) || 0); 171                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val((+$(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() + 1) || 0);
172                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").trigger('change'); 172                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").trigger('change');
173                 $(this).focus(); 173                 $(this).focus();
174             } 174             }
175         }); 175         });
176         $(".qty-dec").unbind('click').click(function(){ 176         $(".qty-dec").unbind('click').click(function(){
177             if($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").is(':enabled')){ 177             if($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").is(':enabled')){
178                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val(($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() - 1 > 0) ? ($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() - 1) : 0); 178                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val(($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() - 1 > 0) ? ($(this).parents('.field.qty,.control.qty').find("input.input-text.qty").val() - 1) : 0);
179                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").trigger('change'); 179                 $(this).parents('.field.qty,.control.qty').find("input.input-text.qty").trigger('change');
180                 $(this).focus(); 180                 $(this).focus();
181             } 181             }
182         }); 182         });
183     }); 183     });
184 }); 184 });
185 require([ 185 require([
186     'jquery', 186     'jquery',
187     'js/jquery.lazyload' 187     '
lazyload'
188 ], function ($) { 188 ], function ($) {
189     $(document).ready(function(){ 189     $(document).ready(function(){
190         $("img.porto-lazyload:not(.porto-lazyload-loaded)").lazyload({effect:"fadeIn", effect_speed: 400 }); 190         $("img.porto-lazyload:not(.porto-lazyload-loaded)").lazyload({effect:"fadeIn", effect_speed: 400 });
191         if ($('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').length) { 191         if ($('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').length) {
192             $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('initialized.owl.carousel', function() { 192             $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('initialized.owl.carousel', function() {
193                 $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); 193                 $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear');
194             }); 194             });
195             $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('changed.owl.carousel', function() { 195             $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('changed.owl.carousel', function() {
196                 $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); 196                 $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear');
197             }); 197             });
198         } 198         }
199         window.setTimeout(function(){ 199         window.setTimeout(function(){
200             $('.sidebar-filterproducts').find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); 200             $('.sidebar-filterproducts').find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear');
201         },500); 201         },500);
202     }); 202     });
203 }); 203 });